<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="__PUBLIC__/Css/public.css"/>
    <js file="__PUBLIC__/Js/jquery-1.7.2.min.js"/>
    <script type='text/javascript'>
    $(function(){
        var y=$('#y').text();
        var t=$('#t').text();
        var kk=$('select[name=school_year] > option');
        var ll=$('select[name=term] > option');
        for(var i=0;i<kk.length;i++){
            if($(kk[i]).val()==y){
                $(kk[i]).attr("selected",true);
            }
        }

        for(var i=0;i<ll.length;i++){
            if($(ll[i]).val()==t){
                $(ll[i]).attr("selected",true);
            }
        }


    });
</script>
</head>
<body>
<form action="{:U('Index/Index/show')}" method="post">
    <h3>请选择学年</h3>
    <select name="school_year">
        <foreach name="sch_year" item="m">
            <option value="{$m.l}-{$m.b}">{$m.l}-{$m.b}</option>
        </foreach>
    </select>
    <h3>请选择学期</h3>
    <select name="term">
        <option value="1">1</option>
        <option value="2">2</option>

    </select>

 <input type="hidden" name="student_number" value="{$number}">


    <input type="submit" value="查询">

</form>

<table class="table">
    <tr>

        <th>学籍号</th>
        <th>考号</th>
        <th>班级</th>
        <th>姓名</th>
        <th>学年</th>
        <th>学期</th>
    </tr>
    <tr>
        <td>{$nati.student_number}</td>
        <td>{$nati.test_number}</td>
        <td>{$nati.class}</td>
        <td>{$nati.student_name}</td>
        <td id="y">{$nati.school_year}</td>
        <td id="t">{$nati.term}</td>
    </tr>
    <foreach name="sub_res" item="v">
        <tr>
            <td>{$v.subject}</td>
            <td>{$v.result}</td>
        </tr>
    </foreach>
    <tr>
        <td>平均分</td>
        <td>{$p}</td>
    </tr>
    <tr>
        <td>总分</td>
        <td>{$z}</td>
    </tr>
    <tr>
        <td>合格科目数</td>
        <td>{$hh}</td>
    </tr>
    <tr>
        <td>班级等级</td>
        <td>{$d}</td>
    </tr>
    <tr>
        <td>全校等级</td>
        <td>{$dd}</td>
    </tr>


</table>
</body>
</html>